<%@ tag dynamic-attributes="dynAttr" body-content="empty" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@tag import="java.util.*" %>
<%--@ attribute name="currentItem" required="true" rtexprvalue="true" type="me.blog.bean.PaginatorAdapter" --%>

<%@ attribute name="url" required="true" rtexprvalue="true" type="java.lang.String" %>
<%@ attribute name="adapter" required="true" rtexprvalue="true" type="com.wslds.base.dao.page.PageAdapter" %>
<%@ attribute name="queryString"  rtexprvalue="true" type="java.lang.String" %>
<%
%>


	<div class="common_page" >
		<span class="canclick">
			<c:choose>
				<c:when test="${ adapter.curPage eq 1 }" >
					<span>&lt;</span>
				</c:when>
				<c:otherwise>
					<span>
						<a rel="nofollow" href="javascript:;" onclick="javascript:WSLDS.Method.page('${ url }?page=${ adapter.curPage-1 }&${ queryString }','pages')">&lt;</a>
					</span>	
				</c:otherwise>
			</c:choose>
		</span>
		<c:forEach  var="i" begin="1" end="${adapter.maxPage}"  >
			<c:choose>
				<c:when test="${ i eq adapter.curPage }">
					<span class="curPage">
						${ i }
					</span>
				</c:when>
				<c:when test="${ i ne adapter.curPage }">
					<span class="canclick">
						<a rel="nofollow" href="javascript:;"  onclick="javascript:WSLDS.Method.page('${ url }?page=${ i }&${ queryString }','pages')">${ i }</a>
					</span>
				</c:when>
			</c:choose>	
		</c:forEach>
		<span class="canclick">
			<c:choose>
				<c:when test="${ adapter.curPage eq adapter.maxPage }" >
					<span>&gt;</span>
				</c:when>
				<c:otherwise>
					<span>
						<a rel="nofollow" href="javascript:;" onclick="javascript:WSLDS.Method.page('${ url }?page=${ adapter.curPage+1 }&${ queryString }','pages')">&gt;</a>
					</span>	
				</c:otherwise>
			</c:choose>
		</span>
	</div>